package com.gorbas.springsocial.wicket;

import org.springframework.social.connect.ConnectionRepository;
import org.springframework.social.oauth1.OAuthToken;

/**
 * Your actual Wicket Session should implement this interface in order to keep whatever is required for the Spring Social procedure
 * 
 * @author anagnostaros
 *
 */
public interface OAuthSessionIF {
    public OAuthToken getAuthToken();

    public void setAuthToken(OAuthToken oAuthToken);

    /**
     * It should be only accessible from OAuthEntryPointController!
     * @param userId
     * @param connectionRepository
     */
    void setConnectionRepository(String userId,ConnectionRepository connectionRepository);

    /**
     * It should be only accessible from OAuthEntryPointController!
     * <br/>remove userId and connectionRepository from session
     */
    void logout();
    
    public ConnectionRepository getConnectionRepository();
    
    public String getUserId();
    
}
